<?php

if($_SERVER['REQUEST_METHOD'] == 'POST')
{
	if($blog->BlogSet($blogid, $_POST))
	{
		echo "设置成功!";
	}
}
$blog_info = $blog->GetBlogInfo($blogid);
$skin_list = $blog->GetSkinsList();

?></div>
<div id="content"><div class="admin-form">
<h3>Blog设置</h3>
<form action="index.php?Action=BlogSet" method="post">
<fieldset>
		<dl>
			<dt>Blog 标题：</dt>
			<dd><input type="text" name="blogname" value="<?php echo $blog_info['F_BLOG_NAME'] ?>"></dd>
		</dl>
		<dl>
			<dt>Blog描述：</dt>
			<dd><textarea name="description" cols="50" rows="6"><?php echo $blog_info['F_BLOG_DESCRIPTION'] ?></textarea></dd>
		</dl>
		<dl>
			<dt>Blog关键字：</dt>
			<dd><textarea name="keyword" cols="50" rows="6"><?php echo $blog_info['F_BLOG_KEYWORDS']?></textarea></dd>
		</dl>
		<dl>
			<dt>Blog模板：</dt>
			<dd>
				<select name="skins">
<?php
foreach($skin_list as $value)
{
	echo "<option value=\"{$value['F_SKINS_FILE']}\"";
	if($blog_info['F_BLOG_DEFAULT_SKINS'] == $value['F_SKINS_FILE']) echo " selected";
	echo ">".$value['F_SKINS_NAME'];
	echo "</option>";
}
?>
				</select>
			</dd>
		</dl>
		<dl>
			<dt>评论状态：</dt>
			<dd><input type="checkbox" name="comStatus" <?php if($blog_info['F_BLOG_PERM_COMMENTS'] == 1) echo "checked" ?>>允许评论</dd>
		</dl>
		<dl>
			<dt>Blog状态：</dt>
			<dd><input type="checkbox" name="lock" <?php if($blog_info['F_BLOG_IS_LOCKED'] == 1) echo "checked" ?>>锁定</dd>
		</dl>
		<dl>
			<dt>Blog密码：</dt>
			<dd><input type="password" name="password"></dd>
		</dl>
		<dl>
			<dt>确认密码：</dt>
			<dd><input type="password" name="confirm"></dd>
		</dl>
		<dl>
			<dd class="submit-button"><input type="submit" name="submit" value="提交设置" ></dd>
		</dl>
</fieldset>
</form></div></div>